package com.lims.landInfo.dao;

import org.springframework.stereotype.Repository;

import javacommon.base.*;

import cn.org.rapid_framework.page.*;

import com.lims.landInfo.model.*;
import com.lims.landInfo.vo.query.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Repository @SuppressWarnings("unchecked")
public class LandFileDao extends BaseHibernateDao<LandFile,java.lang.String>{
	
	public Class getEntityClass() {
		return LandFile.class;
	}
	
	public Page findPage(LandFileQuery query) {
        //XsqlBuilder syntax,please see http://code.google.com/p/rapid-xsqlbuilder
        // [column]为字符串拼接, {column}为使用占位符. [column]为使用字符串拼接,如username='[username]',偷懒时可以使用字符串拼接 
        // [column] 为PageRequest的属性
		String sql = "select t from LandFile t where 1=1 "
			  	+ "/~ and t.sno = {sno} ~/"
			  	+ "/~ and t.name = {name} ~/"
			  	+ "/~ and t.filePath = {filePath} ~/"
			  	+ "/~ and t.downFilePath = {downFilePath} ~/"
			  	+ "/~ and t.fileType = {fileType} ~/"
			  	+ "/~ and t.describe = {describe} ~/"
			  	+ "/~ and t.landId = {landId} ~/"
				+ "/~ order by [sortColumns] ~/";
        
		return pageQuery(sql,query);
	}
	

}
